<?php
	require("../inc/functions.php");
	require_once("../inc/users.php");
	$results = GetUsers();
		
?>
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8" />
		<title>Database Interaction</title>
		<meta name="description" content="" />
		<link rel="stylesheet" type="text/css" href="../inc/css/bootstrap.css"/>
   	</head>

	<body>
    
    	<?php include('../inc/header.php'); ?>
        <div class="container">
        <div>
        	<?php include('../inc/nav.php'); ?>
        </div>
    	<div id="contents">
            <table class="table table-striped">
                <thead>
                    <th>First Name</th>
                    <th>Last Name</th>
                    <th>Actions</th>
                </thead>
            <? while($rs = $results->fetch_assoc()) : ?>
                <tr>
                    <td><?=$rs['FirstName']?></td>
                    <td> <?=$rs['LastName']?> </td>
                    <td>
                        <a href="details.php?id=<?=$rs['id']?>">Details</a>
                        <a href="edit.php?id=<?=$rs['id']?>">Edit</a>
                        <a href="delete.php?id=<?=$rs['id']?>">Delete</a>
                    </td>
            <? endwhile; ?>
            </table>
            </div>
       </div>
	</body>
</html>
